home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
050a.dms
/
050a.adf
/
EXAMPLE_PROGRAMS
/
example15_1.AMOS
/
example15_1.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1992-02-26
|
2KB
|
81 lines
Rem example15_1.Amos
Rem Another way of producing a mouse driven menu
Rem As this program is very similar to example15 I will only rem the new bits
'--------------------------------------------------------------------------
Change Mouse 2
BEGIN:
Rem unpack the previously designed menu screen
'----------------------------------------------
Unpack 10 To 0
Paper 2 : Pen 0
Centre "Click on an option, any mouse key to quit playing music and viewing picture."
Rem set up the zone coordinates, gathered from the getzone.amos program
'----------------------------------------------------------------------
Reserve Zone 3
Set Zone 1,256,93 To 362,104 : Rem set loadiff coords for zone
Set Zone 2,256,109 To 362,119 : Rem load mod
Set Zone 3,256,125 To 362,136 : Rem quit
'
'
Rem the main loop, waiting for a selection to act on
'---------------------------------------------------
Do
While Mouse Key=0 : Wend
KK=Mouse Zone
Rem if a valid selection is made (1,2 or 3) then gosub relevant program
'-----------------------------------------------------------------------
If KK=1 Then Gosub PIC : Goto BEGIN
If KK=2 Then Gosub LMOD : Goto BEGIN
If KK=3 Then Edit
Loop
Rem the loadiff subroutine,when finds a return, returns to the
Rem execute the next staement in the line it came from.
'--------------------------------------------------------------
PIC:
F$=Fsel$("*.*","","SELECT AN IFF PICTURE")
Rem if quit selected from menu return now
'----------------------------------------
If F$="" Then Return
Rem else load the picture into screen 0
'---------------------------------------
Load Iff F$,0
Rem wait for mouse key
'----------------------
While Mouse Key=0 : Wend
Rem finished viewing so RETURN from this subroutine
'---------------------------------------------------
Return
Rem the load mod subroutine similar to above
'-------------------------------------------
LMOD:
F$=Fsel$("*.*","","SELECT A TRACKER MOD")
If F$="" Then Return
Track Load F$,5
Track Play 5
While Mouse Key=0 : Wend
Track Stop
Return